package com.ahsjdy.st.stservice.service.impl;

import com.ahsjdy.st.stdao.entity.Merchant;
import com.ahsjdy.stcommon.exception.BizException;
import org.springframework.beans.factory.annotation.Value;

/**
 * @Description
 * @Author xuetao wang
 * @Date 2020/2/2
 */
public class BaseService {

    @Value("${app.merchant.pic.path}")
    protected String picturePath;

    @Value("${app.merchant.pic.url}")
    protected String pictureUrl;

    @Value("${app.max.mil}")
    protected double maxMil;

    public void checkMerchant(Merchant merchant) {
        if (null == merchant) {
            throw new BizException("店铺不存在");
        }

        if (merchant.getStatus() == 4) {
            throw new BizException("店铺已禁用，请联系客服");
        }
    }
}
